<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
	    <base href="<%=basePath%>">
		<title>兑换商品库存查看</title>
        <%@include file="../collect/meta.jsp"%>
		<link rel="stylesheet" href="css/radius.css" type="text/css"></link>
		<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
  	</head>
		<body lang="zh-cn">
	<div class="wrapper">	
       <c:import url="/muser/musertop.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/muser/muserleft.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>库存查看</li>
						</ul>
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->  
						        <form action="exchangegood!selectShopExchangeGoods" name="seekoneMember" method="post">
						        	<table id="table_bug_report" class="table table-striped table-bordered table-hover">
										<tr>
											<td>
												<select name="exgood">
												<option value="0" <c:if test="${exgood =='0'}">selected='selected'</c:if>>全部</option>
											<c:forEach items="${exchangeGoolLog}" var="exchange"  >
												<option value="${exchange.id}" <c:if test="${exgood ==exchange.id}">selected='selected'</c:if>>${exchange.goodname}
												</option>
												</c:forEach>
												</select>
										    	<input type="submit" class="btn btn-primary radius btn-sm" value="搜索" id="oneMemberBtn">
										    </td>
										    <c:forEach items="${exchangeGoolLog}" var="exchange" varStatus="status" >
										   
										    ${exchange.goodname}剩余库存:${exchange.amount}
										  
										    </c:forEach>	
						  </tr>
									</table>
								</form>
								<table id="table_bug_report" class="table table-striped table-bordered table-hover">
										 <tr>
										   <td width="17%" height="25"><div align="center">会员账号</div></td>
										   <td width="17%"><div align="center">会员姓名</div></td>
										   <td width="17%"><div align="center">兑换商品</div></td>
										   <td width="16%"><div align="center">店铺名称</div></td>
										   <td width="23%"><div align="center">兑换时间</div></td>
										 </tr>
										 <c:forEach items="${exchangeLogs}" var="exchangeLog" varStatus="status">
											 <tr <c:if test="${status.count%2==0}">bgcolor="#d8e7f0"</c:if> <c:if test="${status.count%2!=0}">bgcolor="#ffffff"</c:if>>
											   <td height="25"><div align="center">${exchangeLog.member.mobile }</div></td>
											   <td><div align="center">
											   ${exchangeLog.member.name}
											   </div></td>
											   <td><div align="center"> ${exchangeLog.exchangeGood.goodname}</div></td>
											   <td><div align="center">${exchangeLog.shop.name}</div></td>
											   <td><div align="center">${exchangeLog.createTime }</div></td>
											 </tr>
										 </c:forEach>
									</table>			
								<table width="100%" border="0">
						          <tr bgcolor="#fff0f0">
						            <td width="19%">&nbsp;</td>
						            <td width="13%"><div align="center"><a href="exchangegood!selectShopExchangeGoods?index=1&exgood=${exgood }">第一页</a></div></td>
						            <td width="13%"><div align="center"><a href="exchangegood!selectShopExchangeGoods?index=${index-1}&exgood=${exgood}">上一页</a></div></td>
						            <td width="10%"><div align="center">${index }</div></td>
						            <td width="13%"><div align="center"><a href="exchangegood!selectShopExchangeGoods?index=${index+1 }&exgood=${exgood}">下一页</a></div></td>
						            <td width="13%"><div align="center"><a href="exchangegood!selectShopExchangeGoods?index=${page }&exgood=${exgood}">最末页</a></div></td>
						            <td width="19%">&nbsp;</td>
						          </tr>
						        </table>
								 <!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse" style="position:fixed;bottom:0;">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->
		<div class="push"></div>
     </div>
     <c:import url="/collect/down.jsp"></c:import>
  	</body>
  
  <script type="text/javascript">
  	$(document).ready(function(){
		$('.duihuan > ul').show();
		$('.duihuan > ul > li > a').eq(1).css("color","red");
	});
  </script>
</html>
